package com.pb.b2b.common.service;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

public interface BaseService {

	public Serializable save(Object transientInstance);

	public void saveOrUpdate(Object transientInstance);

	public void delete(Object persistentInstance);

	public void deleteAll(Class entityClass);

	public void deleteAll(Collection entities);

	public Object findById(Class entityClass, Serializable id);

	public List findByExample(Object instance);

	public List findAll(Class entityClass);

	public List findByProperty(Class entityClass, String propertyName, Object value);

	public List findByProperties(Class entityClass, String[] propertyNames, Object[] values);

	public Object findByPropertyUnique(Class entityClass, String propertyName, Object value);

	public List findByIds(Class claz, List<Serializable> idList);

	public void evict(Object objToEvict);

	public void merge(Object obj);

}